package com.xmg.design23.d19_memento;

/**
 * @Author: mazhongqing
 * @Date: 2021/3/25 14:22
 */
public class Originator {
    private String state;

    public String getState() {
        return state;
    }

    public void setState(String state) {
        this.state = state;
    }

    public Memento createMemento(){
        return new Memento(state);
    }

    public void restoreMemento(Memento m){
        this.setState(m.getState());
    }
}
